
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>

<HEAD>
   <TITLE>spkezr_c</TITLE>
</HEAD>

<BODY style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<A name="TOP"></A>

<table style="text-align: left; margin-left: auto; margin-right: auto; width: 800px;"
 border="0" cellpadding="5" cellspacing="2">
  <tbody>
    <tr>
      <td style="background-color: rgb(153, 153, 153); vertical-align: middle; text-align: center;">
      <div align="right"> 
      <small><small><a href="index.html">Index Page</a></small></small>
      </div>
      <b>spkezr_c</b> </td>
    </tr>

    <tr>
      <td style="vertical-align: top;">

<small><div align="center">
<A HREF="index.html#A">A</A>&nbsp;
<A HREF="index.html#B">B</A>&nbsp;
<A HREF="index.html#C">C</A>&nbsp;
<A HREF="index.html#D">D</A>&nbsp;
<A HREF="index.html#E">E</A>&nbsp;
<A HREF="index.html#F">F</A>&nbsp;
<A HREF="index.html#G">G</A>&nbsp;
<A HREF="index.html#H">H</A>&nbsp;
<A HREF="index.html#I">I</A>&nbsp;
<A HREF="index.html#J">J</A>&nbsp;
<A HREF="index.html#K">K</A>&nbsp;
<A HREF="index.html#L">L</A>&nbsp;
<A HREF="index.html#M">M</A>&nbsp;
<A HREF="index.html#N">N</A>&nbsp;
<A HREF="index.html#O">O</A>&nbsp;
<A HREF="index.html#P">P</A>&nbsp;
<A HREF="index.html#Q">Q</A>&nbsp;
<A HREF="index.html#R">R</A>&nbsp;
<A HREF="index.html#S">S</A>&nbsp;
<A HREF="index.html#T">T</A>&nbsp;
<A HREF="index.html#U">U</A>&nbsp;
<A HREF="index.html#V">V</A>&nbsp;
<A HREF="index.html#W">W</A>&nbsp;
<A HREF="index.html#X">X</A>&nbsp;
</div></small>
       <br>
       <table style="text-align: left; width: 60%; margin-left: auto; margin-right: auto;"
       border="0" cellspacing="2" cellpadding="2">
        <tbody>
          <tr>
            <td style="width: 50%; text-align: center;">
            <small>
              <a href="#Procedure">Procedure<br></a>
              <a href="#Abstract">Abstract<br></a>
              <a href="#Required_Reading">Required_Reading<br></a>
              <a href="#Keywords">Keywords<br></a>
              <a href="#Brief_I/O">Brief_I/O<br></a>
              <a href="#Detailed_Input">Detailed_Input<br></a>

              </small>
              </td>
              <td style="vertical-align: top; width: 50%; text-align: center;">
              <small>               <a href="#Detailed_Output">Detailed_Output<br></a>
              <a href="#Parameters">Parameters<br></a>
              <a href="#Exceptions">Exceptions<br></a>
              <a href="#Files">Files<br></a>
              <a href="#Particulars">Particulars<br></a>
              <a href="#Examples">Examples<br></a>

              </small>
              </td>
              <td style="vertical-align: top; width: 50%; text-align: center;">
              <small>               <a href="#Restrictions">Restrictions<br></a>
              <a href="#Literature_References">Literature_References<br></a>
              <a href="#Author_and_Institution">Author_and_Institution<br></a>
              <a href="#Version">Version<br></a>
              <a href="#Index_Entries">Index_Entries<br></a>
             </small>
            </td>
          </tr>
        </tbody>
</table>

<h4><a name="Procedure">Procedure</a></h4>
<PRE>
   void spkezr_c ( ConstSpiceChar     *targ,
                   SpiceDouble         et,
                   ConstSpiceChar     *ref,
                   ConstSpiceChar     *abcorr,
                   ConstSpiceChar     *obs,
                   SpiceDouble         starg[6],
                   SpiceDouble        *lt        )
 
</PRE>
<h4><a name="Abstract">Abstract</a></h4>
<PRE>
 
   Return the state (position and velocity) of a target body 
   relative to an observing body, optionally corrected for light 
   time (planetary aberration) and stellar aberration. 
 </PRE>
<h4><a name="Required_Reading">Required_Reading</a></h4>
<PRE>
 
   <a href="../req/spk.html">SPK</a> 
   <a href="../req/naif_ids.html">NAIF_IDS</a> 
   <a href="../req/frames.html">FRAMES</a> 
   <a href="../req/time.html">TIME</a> 
 </PRE>
<h4><a name="Keywords">Keywords</a></h4>
<PRE>
 
   EPHEMERIS 
 

</PRE>
<h4><a name="Brief_I/O">Brief_I/O</a></h4>
<PRE>
 
   Variable  I/O  Description 
   --------  ---  -------------------------------------------------- 
   targ       I   Target body name. 
   et         I   Observer epoch. 
   ref        I   Reference frame of output state vector. 
   abcorr     I   Aberration correction flag. 
   obs        I   Observing body name. 
   starg      O   State of target. 
   lt         O   One way light time between observer and target. 
 </PRE>
<h4><a name="Detailed_Input">Detailed_Input</a></h4>
<PRE>
 
   targ        is the name of a target body. Optionally, you may 
               supply the integer ID code for the object as 
               an integer string. For example both &quot;MOON&quot; and 
               &quot;301&quot; are legitimate strings that indicate the  
               moon is the target body. 
 
               The target and observer define a state vector whose 
               position component points from the observer to the 
               target. 
 
   et          is the ephemeris time, expressed as seconds past J2000 
               TDB, at which the state of the target body relative to 
               the observer is to be computed. `et' refers to time at 
               the observer's location. 
 
   ref         is the name of the reference frame relative to which 
               the output state vector should be expressed. This may 
               be any frame supported by the SPICE system, including 
               built-in frames (documented in the Frames Required 
               Reading) and frames defined by a loaded frame kernel
               (FK). 
 
               When `ref' designates a non-inertial frame, the 
               orientation of the frame is evaluated at an epoch  
               dependent on the selected aberration correction. 
               See the description of the output state vector `starg' 
               for details. 
 
   abcorr      indicates the aberration corrections to be applied 
               to the state of the target body to account for one-way 
               light time and stellar aberration. See the discussion 
               in the Particulars section for recommendations on  
               how to choose aberration corrections. 
                 
               `abcorr' may be any of the following: 
 
                  &quot;NONE&quot;     Apply no correction. Return the  
                             geometric state of the target body  
                             relative to the observer.  
 
               The following values of `abcorr' apply to the
               &quot;reception&quot; case in which photons depart from the
               target's location at the light-time corrected epoch
               et-lt and *arrive* at the observer's location at
               `et':
 
                  &quot;LT&quot;       Correct for one-way light time (also 
                             called &quot;planetary aberration&quot;) using a 
                             Newtonian formulation. This correction 
                             yields the state of the target at the 
                             moment it emitted photons arriving at 
                             the observer at `et'. 
 
                             The light time correction uses an
                             iterative solution of the light time 
                             equation (see Particulars for details). 
                             The solution invoked by the &quot;LT&quot; option 
                             uses one iteration. 
 
                  &quot;LT+S&quot;     Correct for one-way light time and 
                             stellar aberration using a Newtonian 
                             formulation. This option modifies the 
                             state obtained with the &quot;LT&quot; option to 
                             account for the observer's velocity 
                             relative to the solar system 
                             barycenter. The result is the apparent 
                             state of the target---the position and 
                             velocity of the target as seen by the 
                             observer. 
 
                  &quot;CN&quot;       Converged Newtonian light time 
                             correction. In solving the light time 
                             equation, the &quot;CN&quot; correction iterates 
                             until the solution converges (three 
                             iterations on all supported platforms). 
 
                             The &quot;CN&quot; correction typically does not 
                             substantially improve accuracy because 
                             the errors made by ignoring 
                             relativistic effects may be larger than 
                             the improvement afforded by obtaining 
                             convergence of the light time solution. 
                             The &quot;CN&quot; correction computation also  
                             requires a significantly greater number 
                             of CPU cycles than does the  
                             one-iteration light time correction. 
 
                  &quot;CN+S&quot;     Converged Newtonian light time 
                             and stellar aberration corrections. 
 
 
               The following values of `abcorr' apply to the 
               &quot;transmission&quot; case in which photons *depart* from 
               the observer's location at `et' and arrive at the 
               target's location at the light-time corrected epoch 
               et+lt: 
 
                  &quot;XLT&quot;      &quot;Transmission&quot; case:  correct for 
                             one-way light time using a Newtonian 
                             formulation. This correction yields the 
                             state of the target at the moment it 
                             receives photons emitted from the 
                             observer's location at `et'. 
 
                  &quot;XLT+S&quot;    &quot;Transmission&quot; case:  correct for 
                             one-way light time and stellar 
                             aberration using a Newtonian 
                             formulation  This option modifies the 
                             state obtained with the &quot;XLT&quot; option to 
                             account for the observer's velocity 
                             relative to the solar system 
                             barycenter. The position component of 
                             the computed target state indicates the 
                             direction that photons emitted from the 
                             observer's location must be &quot;aimed&quot; to 
                             hit the target. 
 
                  &quot;XCN&quot;      &quot;Transmission&quot; case:  converged  
                             Newtonian light time correction. 
 
                  &quot;XCN+S&quot;    &quot;Transmission&quot; case:  converged  
                             Newtonian light time and stellar  
                             aberration corrections. 
 
 
               Neither special nor general relativistic effects are 
               accounted for in the aberration corrections applied 
               by this routine. 
 
               Case and blanks are not significant in the string 
               `abcorr'. 
 
   obs         is the name of an observing body. Optionally, you may 
               supply the ID code of the object as an integer string. 
               For example, both &quot;EARTH&quot; and &quot;399&quot; are legitimate 
               strings to supply to indicate the observer is 
               Earth. 
 </PRE>
<h4><a name="Detailed_Output">Detailed_Output</a></h4>
<PRE>
 
   starg       is a Cartesian state vector representing the position 
               and velocity of the target body relative to the 
               specified observer. `starg' is corrected for the 
               specified aberrations, and is expressed with respect 
               to the reference frame specified by `ref'. The first 
               three components of `starg' represent the x-, y- and 
               z-components of the target's position; the last three 
               components form the corresponding velocity vector. 
 
               The position component of `starg' points from the 
               observer's location at `et' to the aberration-corrected 
               location of the target. Note that the sense of the 
               position vector is independent of the direction of 
               radiation travel implied by the aberration 
               correction. 
 
               The velocity component of `starg' is the derivative
               with respect to time of the position component of
               `starg.'
 
               Units are always km and km/sec. 
 
               Non-inertial frames are treated as follows: letting 
               `ltcent' be the one-way light time between the observer 
               and the central body associated with the frame, the 
               orientation of the frame is evaluated at et-ltcent, 
               et+ltcent, or `et' depending on whether the requested
               aberration correction is, respectively, for received
               radiation, transmitted radiation, or is omitted. `ltcent'
               is computed using the method indicated by `abcorr'.
 
   lt          is the one-way light time between the observer and 
               target in seconds. If the target state is corrected
               for aberrations, then `lt' is the one-way light time
               between the observer and the light time corrected
               target location. 
 </PRE>
<h4><a name="Parameters">Parameters</a></h4>
<PRE>
 
   None. 
 </PRE>
<h4><a name="Exceptions">Exceptions</a></h4>
<PRE>
 
   1) If name of target or observer cannot be translated to its 
      NAIF ID code, the error SPICE(IDCODENOTFOUND) is signaled. 
 
   2) If the reference frame `ref' is not a recognized reference 
      frame the error SPICE(UNKNOWNFRAME) is signaled. 
 
   3) If the loaded kernels provide insufficient data to  
      compute the requested state vector, the deficiency will 
      be diagnosed by a routine in the call tree of this routine. 
 
   4) If an error occurs while reading an SPK or other kernel file, 
      the error will be diagnosed by a routine in the call tree  
      of this routine. 
 </PRE>
<h4><a name="Files">Files</a></h4>
<PRE>
 
   This routine computes states using SPK files that have been 
   loaded into the SPICE system, normally via the kernel loading 
   interface routine <a href="furnsh_c.html">furnsh_c</a>. See the routine <a href="furnsh_c.html">furnsh_c</a> and the SPK 
   and KERNEL Required Reading for further information on loading 
   (and unloading) kernels. 
 
   If the output state `starg' is to be expressed relative to a 
   non-inertial frame, or if any of the ephemeris data used to 
   compute `starg' are expressed relative to a non-inertial frame in 
   the SPK files providing those data, additional kernels may be 
   needed to enable the reference frame transformations required to 
   compute the state. These additional kernels may be C-kernels, PCK 
   files or frame kernels. Any such kernels must already be loaded 
   at the time this routine is called. 
 </PRE>
<h4><a name="Particulars">Particulars</a></h4>
<PRE>
 
   This routine is part of the user interface to the SPICE ephemeris 
   system. It allows you to retrieve state information for any 
   ephemeris object relative to any other in a reference frame that 
   is convenient for further computations. 
 
   This routine is identical in function to the routine <a href="spkez_c.html">spkez_c</a> except 
   that it allows you to refer to ephemeris objects by name (via a 
   character string). 
 
 
   Aberration corrections 
   ====================== 
 
   In space science or engineering applications one frequently 
   wishes to know where to point a remote sensing instrument, such 
   as an optical camera or radio antenna, in order to observe or 
   otherwise receive radiation from a target. This pointing problem 
   is complicated by the finite speed of light:  one needs to point 
   to where the target appears to be as opposed to where it actually 
   is at the epoch of observation. We use the adjectives 
   &quot;geometric,&quot; &quot;uncorrected,&quot; or &quot;true&quot; to refer to an actual 
   position or state of a target at a specified epoch. When a 
   geometric position or state vector is modified to reflect how it 
   appears to an observer, we describe that vector by any of the 
   terms &quot;apparent,&quot; &quot;corrected,&quot; &quot;aberration corrected,&quot; or &quot;light 
   time and stellar aberration corrected.&quot; The SPICE Toolkit can
   correct for two phenomena affecting the apparent location of an
   object:  one-way light time (also called &quot;planetary aberration&quot;) and
   stellar aberration.

   One-way light time
   ------------------

   Correcting for one-way light time is done by computing, given an
   observer and observation epoch, where a target was when the observed
   photons departed the target's location. The vector from the
   observer to this computed target location is called a &quot;light time
   corrected&quot; vector. The light time correction depends on the motion
   of the target relative to the solar system barycenter, but it is
   independent of the velocity of the observer relative to the solar
   system barycenter. Relativistic effects such as light bending and
   gravitational delay are not accounted for in the light time
   correction performed by this routine.
 
   Stellar aberration
   ------------------

   The velocity of the observer also affects the apparent location 
   of a target:  photons arriving at the observer are subject to a 
   &quot;raindrop effect&quot; whereby their velocity relative to the observer 
   is, using a Newtonian approximation, the photons' velocity 
   relative to the solar system barycenter minus the velocity of the 
   observer relative to the solar system barycenter. This effect is 
   called &quot;stellar aberration.&quot;  Stellar aberration is independent 
   of the velocity of the target. The stellar aberration formula 
   used by this routine does not include (the much smaller)
   relativistic effects.
 
   Stellar aberration corrections are applied after light time 
   corrections:  the light time corrected target position vector is  
   used as an input to the stellar aberration correction. 
 
   When light time and stellar aberration corrections are both 
   applied to a geometric position vector, the resulting position  
   vector indicates where the target &quot;appears to be&quot; from the 
   observer's location.  
 
   As opposed to computing the apparent position of a target, one 
   may wish to compute the pointing direction required for 
   transmission of photons to the target. This also requires correction 
   of the geometric target position for the effects of light time 
   and stellar aberration, but in this case the corrections are 
   computed for radiation traveling *from* the observer to the target. 
   We will refer to this situation as the &quot;transmission&quot; case.

   The &quot;transmission&quot; light time correction yields the target's 
   location as it will be when photons emitted from the observer's 
   location at `et' arrive at the target. The transmission stellar 
   aberration correction is the inverse of the traditional stellar 
   aberration correction:  it indicates the direction in which 
   radiation should be emitted so that, using a Newtonian 
   approximation, the sum of the velocity of the radiation relative 
   to the observer and of the observer's velocity, relative to the  
   solar system barycenter, yields a velocity vector that points in  
   the direction of the light time corrected position of the target. 
  
   One may object to using the term &quot;observer&quot; in the transmission
   case, in which radiation is emitted from the observer's location.
   The terminology was retained for consistency with earlier
   documentation.
 
   Below, we indicate the aberration corrections to use for some 
   common applications: 
 
      1) Find the apparent direction of a target. This is 
         the most common case for a remote-sensing observation.
 
            Use &quot;LT+S&quot;:  apply both light time and stellar  
            aberration corrections. 
 
         Note that using light time corrections alone (&quot;LT&quot;) is 
         generally not a good way to obtain an approximation to an 
         apparent target vector:  since light time and stellar 
         aberration corrections often partially cancel each other, 
         it may be more accurate to use no correction at all than to 
         use light time alone. 
 
 
      2) Find the corrected pointing direction to radiate a signal 
         to a target. This computation is often applicable for 
         implementing communications sessions.
 
            Use &quot;XLT+S&quot;:  apply both light time and stellar  
            aberration corrections for transmission. 
 
  
      3) Compute the apparent position of a target body relative 
         to a star or other distant object.
 
            Use &quot;LT&quot; or &quot;LT+S&quot; as needed to match the correction 
            applied to the position of the distant object. For 
            example, if a star position is obtained from a catalog, 
            the position vector may not be corrected for stellar 
            aberration. In this case, to find the angular 
            separation of the star and the limb of a planet, the 
            vector from the observer to the planet should be 
            corrected for light time but not stellar aberration. 
 

      4) Obtain an uncorrected state vector derived directly from  
         data in an SPK file.
 
            Use &quot;NONE&quot;. 
 

      5) Use a geometric state vector as a low-accuracy estimate 
         of the apparent state for an application where execution  
         speed is critical.
 
            Use &quot;NONE&quot;. 
 
 
      6) While this routine cannot perform the relativistic 
         aberration corrections required to compute states 
         with the highest possible accuracy, it can supply the 
         geometric states required as inputs to these computations.
 
            Use &quot;NONE&quot;, then apply relativistic aberration 
            corrections (not available in the SPICE Toolkit). 
 
 
   Below, we discuss in more detail how the aberration corrections 
   applied by this routine are computed.      
 
      Geometric case 
      ============== 
 
      <b>spkezr_c</b> begins by computing the geometric position T(et) of the 
      target body relative to the solar system barycenter (SSB). 
      Subtracting the geometric position of the observer O(et) gives 
      the geometric position of the target body relative to the 
      observer. The one-way light time, lt, is given by 
 
                | T(et) - O(et) | 
         lt = ------------------- 
                        c 
 
      The geometric relationship between the observer, target, and 
      solar system barycenter is as shown: 
 
 
         SSB ---&gt; O(et) 
          |      / 
          |     / 
          |    /                            
          |   /  T(et) - O(et)   
          V  V                                   
         T(et) 
 
 
      The returned state consists of the position vector 
 
         T(et) - O(et) 
 
      and a velocity obtained by taking the difference of the 
      corresponding velocities. In the geometric case, the  
      returned velocity is actually the time derivative of the  
      position. 
 
 
      Reception case 
      ============== 
 
      When any of the options &quot;LT&quot;, &quot;CN&quot;, &quot;LT+S&quot;, &quot;CN+S&quot; is selected
      for `abcorr', <b>spkezr_c</b> computes the position of the target body at
      epoch et-lt, where `lt' is the one-way light time. Let T(t) and
      O(t) represent the positions of the target and observer 
      relative to the solar system barycenter at time t; then `lt' is 
      the solution of the light-time equation 
 
                | T(et-lt) - O(et) | 
         lt = ------------------------                            (1) 
                         c 
 
      The ratio  
 
          | T(et) - O(et) | 
        ---------------------                                     (2) 
                  c 
 
      is used as a first approximation to `lt'; inserting (2) into the
      right hand side of the light-time equation (1) yields the
      &quot;one-iteration&quot; estimate of the one-way light time (&quot;LT&quot;).
      Repeating the process until the estimates of `lt' converge yields
      the &quot;converged Newtonian&quot; light time estimate (&quot;CN&quot;).
      
      Subtracting the geometric position of the observer O(et) gives 
      the position of the target body relative to the observer: 
      T(et-lt) - O(et). 
 
         SSB ---&gt; O(et) 
          | \     | 
          |  \    | 
          |   \   | T(et-lt) - O(et) 
          |    \  | 
          V     V V 
         T(et)  T(et-lt) 
       
      The position component of the light time corrected state  
      is the vector 
 
         T(et-lt) - O(et) 
 
      The velocity component of the light time corrected state  
      is the difference 
 
         T_vel(et-lt)*(1-d(lt)/d(et)) - O_vel(et) 
           
      where T_vel and O_vel are, respectively, the velocities of the 
      target and observer relative to the solar system barycenter at 
      the epochs et-lt and `et'.  

      If correction for stellar aberration is requested, the target 
      position is rotated toward the solar system 
      barycenter-relative velocity vector of the observer. The 
      rotation is computed as follows: 
 
         Let r be the light time corrected vector from the observer 
         to the object, and v be the velocity of the observer with 
         respect to the solar system barycenter. Let w be the angle 
         between them. The aberration angle phi is given by 
 
            sin(phi) = v sin(w) / c 
 
         Let h be the vector given by the cross product 
 
            h = r X v 
 
         Rotate r by phi radians about h to obtain the apparent 
         position of the object. 
 
      When stellar aberration corrections are used, the rate of change
      of the stellar aberration correction is accounted for in the
      computation of the output velocity.
 
 
      Transmission case 
      ================== 
 
      When any of the options &quot;XLT&quot;, &quot;XCN&quot;, &quot;XLT+S&quot;, &quot;XCN+S&quot; is 
      selected, <b>spkezr_c</b> computes the position of the target body T at 
      epoch et+lt, where `lt' is the one-way light time. `lt' is the 
      solution of the light-time equation 
 
                | T(et+lt) - O(et) | 
         lt = ------------------------                            (3) 
                          c 
 
      Subtracting the geometric position of the observer, O(et), 
      gives the position of the target body relative to the 
      observer: T(et-lt) - O(et). 
 
                 SSB --&gt; O(et) 
                / |    *  
               /  |  *  T(et+lt) - O(et)   
              /   |*      
             /   *|     
            V  V  V      
        T(et+lt)  T(et)     
 
      The position component of the light-time corrected state  
      is the vector 
 
         T(et+lt) - O(et) 
 
      The velocity component of the light-time corrected state  
      consists of the difference 
 
         T_vel(et+lt)*(1+d(lt)/d(et)) - O_vel(et) 
           
      where T_vel and O_vel are, respectively, the velocities of the 
      target and observer relative to the solar system barycenter at 
      the epochs et+lt and `et'. 
 
      If correction for stellar aberration is requested, the target 
      position is rotated away from the solar system barycenter- 
      relative velocity vector of the observer. The rotation is 
      computed as in the reception case, but the sign of the 
      rotation angle is negated. 
 
 
   Precision of light time corrections 
   =================================== 
 
      Corrections using one iteration of the light time solution 
      ---------------------------------------------------------- 
 
      When the requested aberration correction is &quot;LT&quot;, &quot;LT+S&quot;, 
      &quot;XLT&quot;, or &quot;XLT+S&quot;, only one iteration is performed in the 
      algorithm used to compute lt. 
 
      The relative error in this computation 
 
         | LT_ACTUAL - LT_COMPUTED |  /  LT_ACTUAL 
 
      is at most  
 
          (V/C)**2 
         ---------- 
          1 - (V/C) 
 
      which is well approximated by (V/C)**2, where V is the 
      velocity of the target relative to an inertial frame and C is 
      the speed of light. 
 
      For nearly all objects in the solar system V is less than 60 
      km/sec. The value of C is 300000 km/sec. Thus the one 
      iteration solution for `lt' has a potential relative error of 
      not more than 4*10**-8. This is a potential light time error 
      of approximately 2*10**-5 seconds per astronomical unit of 
      distance separating the observer and target. Given the bound 
      on V cited above: 
 
         As long as the observer and target are 
         separated by less than 50 astronomical units, 
         the error in the light time returned using 
         the one-iteration light time corrections 
         is less than 1 millisecond. 
 
 
      Converged corrections  
      --------------------- 
 
      When the requested aberration correction is &quot;CN&quot;, &quot;CN+S&quot;, 
      &quot;XCN&quot;, or &quot;XCN+S&quot;, three iterations are performed in the 
      computation of `lt'. The relative error present in this 
      solution is at most 
 
          (V/C)**4 
         ---------- 
          1 - (V/C) 
 
      which is well approximated by (V/C)**4. Mathematically the 
      precision of this computation is better than a nanosecond for 
      any pair of objects in the solar system. 
 
      However, to model the actual light time between target and 
      observer one must take into account effects due to general 
      relativity. These may be as high as a few hundredths of a 
      millisecond for some objects. 
 
      When one considers the extra time required to compute the
      converged Newtonian light time (the state of the target relative
      to the solar system barycenter is looked up three times instead
      of once) together with the real gain in accuracy, it seems
      unlikely that you will want to request either the &quot;CN&quot; or &quot;CN+S&quot;
      light time corrections. However, these corrections can be useful
      for testing situations where high precision (as opposed to
      accuracy) is required.
 
 
   Relativistic Corrections 
   ========================= 
 
   This routine does not attempt to perform either general or 
   special relativistic corrections in computing the various 
   aberration corrections. For many applications relativistic 
   corrections are not worth the expense of added computation 
   cycles. If however, your application requires these additional 
   corrections we suggest you consult the astronomical almanac (page 
   B36) for a discussion of how to carry out these corrections. 
 
 </PRE>
<h4><a name="Examples">Examples</a></h4>
<PRE>
 
       Load a planetary ephemeris SPK, then look up a series of 
       geometric states of the moon relative to the earth, 
       referenced to the J2000 frame. 

       #include &lt;stdio.h&gt;
       #include &quot;SpiceUsr.h&quot;

       int main()
       {

          #define        ABCORR        &quot;NONE&quot;
          #define        FRAME         &quot;J2000&quot;

          /.
          The name of the SPK file shown here is fictitious;
          you must supply the name of an SPK file available 
          on your own computer system.
          ./
          #define        SPK           &quot;planetary_spk.bsp&quot;

          /.
          ET0 represents the date 2000 Jan 1 12:00:00 TDB.
          ./
          #define        ET0           0.0

          /.
          Use a time step of 1 hour; look up 100 states.
          ./
          #define        STEP          3600.0
          #define        MAXITR        100 

          #define        OBSERVER      &quot;earth&quot;
          #define        TARGET        &quot;moon&quot;
         

          /.
          Local variables
          ./
          SpiceInt       i;

          SpiceDouble    et;
          SpiceDouble    lt;
          SpiceDouble    state [6];


          /.
          Load the spk file.
          ./
          <a href="furnsh_c.html">furnsh_c</a> ( SPK );

          /.
          Step through a series of epochs, looking up a state vector
          at each one.
          ./
          for ( i = 0;  i &lt; MAXITR;  i++ )
          {
             et  =  ET0 + i*STEP;

             <b>spkezr_c</b> ( TARGET,    et,     FRAME,  ABCORR,
                        OBSERVER,  state,  &amp;lt             );

             printf( &quot;\net = %20.10f\n\n&quot;,                 et       );
             printf( &quot;J2000 x-position (km):   %20.10f\n&quot;, state[0] );
             printf( &quot;J2000 y-position (km):   %20.10f\n&quot;, state[1] );
             printf( &quot;J2000 z-position (km):   %20.10f\n&quot;, state[2] );
             printf( &quot;J2000 x-velocity (km/s): %20.10f\n&quot;, state[3] );
             printf( &quot;J2000 y-velocity (km/s): %20.10f\n&quot;, state[4] );
             printf( &quot;J2000 z-velocity (km/s): %20.10f\n&quot;, state[5] );
          }

          return ( 0 );
       }

  
</PRE>
<h4><a name="Restrictions">Restrictions</a></h4>
<PRE>
 
   None.
</PRE>
<h4><a name="Literature_References">Literature_References</a></h4>
<PRE>
 
   SPK Required Reading.
 </PRE>
<h4><a name="Author_and_Institution">Author_and_Institution</a></h4>
<PRE>
 
   C.H. Acton      (JPL)
   B.V. Semenov    (JPL) 
   N.J. Bachman    (JPL) 
 </PRE>
<h4><a name="Version">Version</a></h4>
<PRE>
   -CSPICE Version 3.0.0, 27-DEC-2007 (NJB)
 
       This routine was upgraded to more accurately compute
       aberration-corrected velocity, and in particular, make it
       more consistent with observer-target positions.

       When light time corrections are used, the derivative of light
       time with respect to time is now accounted for in the
       computation of observer-target velocities. When the reference
       frame associated with the output state is time-dependent, the
       derivative of light time with respect to time is now accounted
       for in the computation of the rate of change of orientation of
       the reference frame.

       When stellar aberration corrections are used, velocities
       now reflect the rate of range of the stellar aberration
       correction.

    -CSPICE Version 2.0.2, 13-OCT-2003 (EDW)

       Added mention that 'lt' returns a value in seconds.
 
   -CSPICE Version 2.0.1, 29-JUL-2003 (NJB) (CHA)

       Various minor header changes were made to improve clarity. 

   -CSPICE Version 2.0.0, 31-DEC-2001 (NJB)

       Updated to handle aberration corrections for transmission
       of radiation. Formerly, only the reception case was
       supported. The header was revised and expanded to explain
       the functionality of this routine in more detail.

   -CSPICE Version 1.2.0, 29-MAY-1999 (NJB) (BVS)
 
      Comment correction:  the name <a href="spkez_c.html">spkez_c</a> was changed to <b>spkezr_c</b>.
</PRE>
<h4><a name="Index_Entries">Index_Entries</a></h4>
<PRE>
 
   using body names get target state relative to an observer 
   get state relative to observer corrected for aberrations 
   read ephemeris data 
   read trajectory data 
 </PRE>
<h4>Link to routine spkezr_c source file <a href='../../../src/cspice/spkezr_c.c'>spkezr_c.c</a> </h4>

      </td>
    </tr>
  </tbody>
</table>

   <pre>Wed Jun  9 13:05:30 2010</pre>

</body>
</html>

